package com.hyq.learn.api.model.request;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * @author heyuqin
 * @date 2024/9/4 11:51
 */
public class ValidatedTwoRequest {
    @NotBlank
    private String name;

    @Min(1)
    @Max(10)
    @NotNull
    private Integer age;

    public ValidatedTwoRequest() {
    }

    public ValidatedTwoRequest(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
